//
//  EmptyView.m
//  ScmProject
//
//  Created by 董雷 on 2020/4/30.
//  Copyright © 2020 session. All rights reserved.
//

#import "EmptyView.h"

@interface EmptyView ()

@end

@implementation EmptyView

- (void)awakeFromNib
{
    [super awakeFromNib];
    // Initialization code
    self.infoLabel.text = NSLocalizedString(@"暂无数据", nil);
    self.infoLabel.textColor = UIColorFromRGB_0x(0x434758);
}

+ (instancetype)emptyView
{
    return [[[NSBundle mainBundle] loadNibNamed:@"EmptyView" owner:self options:nil]lastObject];
}

+ (instancetype)emptyViewWithImageView:(NSString *)image message:(NSString *)message
{
    EmptyView *emptyView = [[[NSBundle mainBundle] loadNibNamed:@"EmptyView" owner:self options:nil]lastObject];
    if (image.length > 0) {
        emptyView.imageView.image = [UIImage imageNamed:image];
    }
    if (message.length > 0) {
        emptyView.infoLabel.text = message;
    }
    return emptyView;
}

#pragma mark --- handle response method

- (IBAction)handleActionResponsee:(UIButton *)sender
{
    BLOCK_EXEC(self.actionBlcok);
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
